<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="../css/reset.css">
    <style>
        ul {
            width: 1000px;
            margin: auto;
        }

        li {
            float: left;
            width: 320px;
            height: 320px;
            background-color: #ff0;
            margin-bottom: 20px;
            margin-right: 20px;
        }

        img {
            width: 320px;
            height: 300px;
        }

        /* .mr0 {
            margin-right: 0;
        } */

        /* :nth-child() 伪类选择器 */
        ul li:nth-child(2n+1) {
            margin-right: 0;
        }
    </style>
</head>

<body>

    <ul>
        <li>
            <img src="../images/main.jpg" alt="">
            <p>呵呵呵</p>
        </li>
        <li>
            <img src="../images/main.jpg" alt="">
            <p>呵呵呵</p>
        </li>
        <li>
            <img src="../images/main.jpg" alt="">
            <p>呵呵呵</p>
        </li>
        <li>
            <img src="../images/main.jpg" alt="">
            <p>呵呵呵</p>
        </li>
        <li>
            <img src="../images/main.jpg" alt="">
            <p>呵呵呵</p>
        </li>
        <li>
            <img src="../images/main.jpg" alt="">
            <p>呵呵呵</p>
        </li>
        <li>
            <img src="../images/main.jpg" alt="">
            <p>呵呵呵</p>
        </li>

    </ul>

</body>

</html>